<?php

class helper extends CApplicationComponent {

    function checkActive($params){
		if($params!=1){
			return true;
		}else false;
	}
	
	function statusApprove($params){
		switch($params){
			case 1:
				return "Approve";
				break;
			case 2:
				return "Not Yet";
				break;
			case 3:
				return "Not Approve";
				break;
		}
	}
	
	function getRole($user){
		if($user != null){
			$rl = Rights::getAssignedRoles($user);
			$r = "";
			foreach ($rl as $role){
				$r = $role->name;
			}
			return $r;
		}else return null;
		
	}

}

?>